20 research outputs found
User-space Multipath UDP in Mosh
In many network topologies, hosts have multiple IP addresses, and may choose
among multiple network paths by selecting the source and destination addresses
of the packets that they send. This can happen with multihomed hosts (hosts
connected to multiple networks), or in multihomed networks using
source-specific routing. A number of efforts have been made to dynamically
choose between multiple addresses in order to improve the reliability or the
performance of network applications, at the network layer, as in Shim6, or at
the transport layer, as in MPTCP. In this paper, we describe our experience of
implementing dynamic address selection at the application layer within the
Mobile Shell. While our work is specific to Mosh, we hope that it is generic
enough to serve as a basis for designing UDP-based multipath applications or
even more general APIs
CPC: programming with a massive number of lightweight threads
Threads are a convenient and modular abstraction for writing concurrent
programs, but often fairly expensive. The standard alternative to threads,
event-loop programming, allows much lighter units of concurrency, but leads to
code that is difficult to write and even harder to understand. Continuation
Passing C (CPC) is a translator that converts a program written in threaded
style into a program written with events and native system threads, at the
programmer's choice. Together with two undergraduate students, we taught
ourselves how to program in CPC by writing Hekate, a massively concurrent
network server designed to efficiently handle tens of thousands of
simultaneously connected peers. In this paper, we describe a number of
programming idioms that we learnt while writing Hekate; while some of these
idioms are specific to CPC, many should be applicable to other programming
systems with sufficiently cheap threads.Comment: To appear in PLACES'1
Source-specific routing
Source-specific routing (not to be confused with source routing) is a routing
technique where routing decisions depend on both the source and the destination
address of a packet. Source-specific routing solves some difficult problems
related to multihoming, notably in edge networks, and is therefore a useful
addition to the multihoming toolbox. In this paper, we describe the semantics
of source-specific packet forwarding, and describe the design and
implementation of a source-specific extension to the Babel routing protocol as
well as its implementation - to our knowledge, the first complete
implementation of a source-specific dynamic routing protocol, including a
disambiguation algorithm that makes our implementation work over widely
available networking APIs. We further discuss interoperability between ordinary
next-hop and source-specific dynamic routing protocols. Our implementation has
seen a moderate amount of deployment, notably as a testbed for the IETF Homenet
working group
Lambda-lifting and CPS conversion in an imperative language
This paper is a companion technical report to the article
"Continuation-Passing C: from threads to events through continuations". It
contains the complete version of the proofs of correctness of lambda-lifting
and CPS-conversion presented in the article.Comment: arXiv admin note: substantial text overlap with arXiv:1011.455
Game Semantics and Subtyping
Game Semantics is a relatively new framework for the description of the semantics of programming languages. By combining the mathematical elegance of Denotational Semantics with explicitly operational concepts, Game Semantics has made possible the direct and intuitive modelling of a large range of programming constructs.
In this thesis, we show how Game Semantics is able to model subtyping. We start by designing an untyped λ-calculus with ground values that explicitly internalises the notion of typing error. We then equip this calculus with a rich typing system that includes quantification (both universal and existential) as well as recursive types.
In a second part, we show how to interpret the untyped calculus; after equipping the domain of the interpretation with an ordering --- the liveness ordering --- loosely inspired from implication on process specifications, we show how our interpretation is both sound and computationally adequate.
In a third part, we introduce a notion of game which we use for interpreting types, and show how the liveness ordering on games is suitable for interpreting subtyping. Finally, we prove that under the (unproved) assumption that recursive types are compatible with quantification, our interpretation is sound with respect to both subtyping and typing
Continuation-Passing C: compiling threads to events through continuations
In this paper, we introduce Continuation Passing C (CPC), a programming
language for concurrent systems in which native and cooperative threads are
unified and presented to the programmer as a single abstraction. The CPC
compiler uses a compilation technique, based on the CPS transform, that yields
efficient code and an extremely lightweight representation for contexts. We
provide a proof of the correctness of our compilation scheme. We show in
particular that lambda-lifting, a common compilation technique for functional
languages, is also correct in an imperative language like C, under some
conditions enforced by the CPC compiler. The current CPC compiler is mature
enough to write substantial programs such as Hekate, a highly concurrent
BitTorrent seeder. Our benchmark results show that CPC is as efficient, while
using significantly less space, as the most efficient thread libraries
available.Comment: Higher-Order and Symbolic Computation (2012). arXiv admin note:
substantial text overlap with arXiv:1202.324
Continuation Passing for C: A space-efficient implementation of concurrency
Threads are a convenient abstraction for programming concurrent systems. They are however expensive, which leads many programmers to use coarse-grained concurrency where a fine-grained structure would be preferable, or use more cumbersome implementation techniques. Cooperative threads can be easily implemented in a language that provides first-class continuations. Unfortunately, CPS conversion, the standard technique for adding continuations to a language, is not natural for typical imperative languages. This paper defines a notion of CPS conversion for the C programming language. Continuation Passing C (CPC) is a concurrent extension of C with very cheap threads. It is implemented as a series of source-tosource transformations, including CPS conversion, that convert a threaded program in direct style into a purely sequential C program. In this paper, we describe CPC and the transformations that are used in its implementation
Juppix: a Linux Live-CD for Undergraduate Students
Juppix is a Linux Live-CD with a comfortable programming environment for the Java, C and O’Caml programming languages that has been distributed to hundreds of undergaduate students at the University of Paris 7 over the last few years. We describe the lessons we learnt while compiling and distributing Juppix, and outline our future plans. 1 Background and motivation Undegraduate teaching of programming at the University of Paris 7 is mostly based on Unix. During the first year, we use the Java programming language with some locally-developed packages [7] and the Emacs editor, in the second year, we add C and PHP, and third year students get to enjoy O’Caml. While on campus, our students do have access to a few dozen reasonably configured machines running a system consisting of FreeBSD Unix and the KDE desktop. In periods of high affluence, such as just before a project deadline, our computer rooms tend to be overcrowded. Even in normal times, many students prefer to wor